<template>
  <div class="frank_notice" v-show="isShowNotice">
    <div  @click="handleCloseNotice">
      <span>通知</span>
      <img src="~assets/close.png" alt="" >
    </div><br>
    <div class="notice_text">
      <strong>车辆：{{ambulanceCode}}，已接收病人：{{patientCode}}</strong>
    </div>
    
  </div>
</template>

<script>
import { reactive, toRefs, onBeforeMount, onMounted,ref } from 'vue'
export default {
  name: '',
  components: { },
  props: [],
  setup() {
    const state = reactive({
      ambulanceCode:ref('001'),
        patientCode:ref('123'),
        isShowNotice:ref(true),
    })
    const handleCloseNotice =() =>{
      state.isShowNotice = false
    }
    onBeforeMount(() => {
    })
    onMounted(() => {
      // setInterval(()=>{
      //   state.isShowNotice = !state.isShowNotice
      // },2000)
    })
    const refState = toRefs(state)
    return {
      ...refState,
      handleCloseNotice
    }
  }
}
</script>
<style scoped>
.frank_notice{
    height: 80px;
    width: 370px;
    background: #fff;
}
.frank_notice img {
  float: right;
}
.frank_notice span {
   margin-left: 10px;
}
.frank_notice .notice_text {
  margin-left: 10px;
  height: 50px;
}
</style>